package com.yingli.camera_system;

import android.content.Intent;
import android.os.Bundle;
import android.widget.Button;

import androidx.appcompat.app.AppCompatActivity;

import com.yingli.camera_system.camera.Camera_Activity;
import com.yingli.camera_system.gallery.Gallery_Activity;

public class MainActivity extends AppCompatActivity {

    private Button camera ;

    private Button gallery ;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        camera = findViewById(R.id.btn_camera);
        gallery = findViewById(R.id.btn_gallery);
        // 获取
        camera.setOnClickListener(v -> {
            startActivity(new Intent(this, Camera_Activity.class));
        });
        gallery.setOnClickListener(v -> {
            startActivity(new Intent(this, Gallery_Activity.class));
        });
    }
}